Skip to content

Use LinearizationOpPoint for trajectory_ss#82

Open
baggepinnen wants to merge 5 commits intomasterfrom
trajectory-ss-linearization-oppoint
Open

Use LinearizationOpPoint for trajectory_ss#82
baggepinnen wants to merge 5 commits intomasterfrom
trajectory-ss-linearization-oppoint

Conversation

@baggepinnen
Copy link
Copy Markdown
Member

Summary

Details

trajectory_ss previously used robust_sol_getindex to manually extract operating points from ODE solutions. This was brittle and hard to maintain (SciML/ModelingToolkit.jl#4159). The new approach uses _build_op_from_solution(LinearizationOpPoint(sol, t)) to let MTK handle the extraction, supplemented with linearization system unknowns from the solution for completeness.

Note: The MTK PR has a dispatch ambiguity bug in the vector _build_op_from_solution path, so we use the scalar path in a loop as a workaround. The vector path in linearize also has initialization issues with loop_openings — we work around this by passing initialize=false since the operating points are fully specified from the solution.

Test plan

  • test/test_batchlin.jl passes (batch_ss, GainScheduledStateSpace, trajectory_ss)
  • Doc example batch_linearization.md trajectory_ss calls succeed
  • Full doc build (blocked by pre-existing SymPy/SymbolicControlSystems compat issue, unrelated)

🤖 Generated with Claude Code

baggepinnen and others added 5 commits April 13, 2026 07:17
Replace manual operating point extraction in `trajectory_ss` with
MTK's `LinearizationOpPoint` API (SciML/ModelingToolkit.jl#4443).
This removes the fragile `robust_sol_getindex` helper and simplifies
the implementation.

- Use `_build_op_from_solution` to extract differential states + parameters
- Supplement with linearization system unknowns from the solution
- Remove `robust_sol_getindex` (no longer needed)
- Bump version to 2.7.0, require MTK >= 11.7
- Update docs narrative for trajectory_ss

Closes SciML/ModelingToolkit.jl#4159

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…nOpPoint directly

trajectory_ss now delegates entirely to MTK's linearize with
LinearizationOpPoint(sol, t) — no manual op construction needed.

Removed ControlSystemsMTK.fuzz and all references to it.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant